<template>
  <div id="app" style="     margin: 0 auto;">
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "app",
  mounted() {
    setTimeout(()=>{
    this.getToastView();
    },500)
  },
  methods: {
    getToastView() {
      var that = this;

      if (this.$store.getters.getMerchant.merchantId) {
        let url = this.$baseUrl.bizUrl + "/statement/query";

        let data = {
          merchantId: this.$store.getters.getMerchant.merchantId
        };
        let callBack = res => {
          if (res == null) {
            console.log("网络请求错误1！");
            return;
          }

          if (res.data.status != 200) {
            return;
          }

          if (res.data.status == 200) {
            console.log("首页取merchant", res.data);
            if (res.data.data.id) {
  
              let storage = window.localStorage;
              storage.statementStatus = res.data.data.status;
              storage.statement  = JSON.stringify(res.data.data)
            }

          }
        };
        this.$reqFormPost(url, data, callBack);
      } else {
        that.getToastView();
      }
    }
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.container {
  height: 100vh;
  width: 100%;
}
.mint-tabbar > .mint-tab-item.is-selected {
  background-color: red;
  color: #26a2ff;
}
</style>
